package com.jz.netthings.bloodsources.service;

import com.baomidou.mybatisplus.service.IService;
import com.jz.netthings.appengine.baseData.ProviderInfo;
import com.jz.netthings.application.bodyCheck.bean.BodyCheck;
import com.jz.netthings.application.bodyCheck.bean.MyPage;
import com.jz.netthings.bloodsources.bean.XyLink;
import com.jz.netthings.bloodsources.bean.XyNoPulping;
import com.jz.netthings.exception.AdscmSystemException;
import com.jz.netthings.security.utils.Token;

import java.util.List;

/**
 * <p>
 * 血源链接表
----表关系↓
--- 血源公告牌鉴权表
             |
---血源链接表
          ---提醒记录表
          ---未献浆记录表
          ---回访记录表
 
 服务类
 * </p>
 *
 * @author 张凡
 * @since 2019-08-03
 */
public interface XyLinkService extends IService<XyLink> {
    /**
     * 根据条件查询相关血源链接记录
     * @param providerAddress
     * @param nurseName
     * @param providerName
     * @param providerActiveLevel
     * @param useVolunteer
     * @param currentPage
     * @param pageSize
     * @return
     * @throws AdscmSystemException
     */
    MyPage<XyLink> queryByCondition(
                                        String useNurseDeptId,
                                        Integer useNurseId,
                                        String providerAddress,
                                        String nurseName,
                                        String providerName,
                                        String providerActiveLevel,
                                        String useVolunteer,
                                        String isPulpingMsg,
                                        String currentPage,
                                        String pageSize
                                        ) throws AdscmSystemException;
    /**
     * 加载血源链接所有开启提醒的记录
     * @return
     * @throws AdscmSystemException
     */
    List<XyLink> loadXyLinkToCache(String pulpingMsgType) throws AdscmSystemException;

    /**
     * 存储血源链接信息
     * @param xyLink
     * @param token
     * @return
     * @throws AdscmSystemException
     */
    Boolean insertXyLinkInfo(XyLink xyLink, Token token)throws AdscmSystemException;

    /**
     * 修改血源链接信息
     * @param xyLink
     * @param token
     * @return
     * @throws AdscmSystemException
     */
    Boolean updateXyLinkInfo(XyLink xyLink, Token token)throws AdscmSystemException;
    Boolean updateByProviderId(XyLink xyLink)throws AdscmSystemException;
}
